﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using CanDoo.Core.Data;
using CanDoo.Data;
using CanDoo.Admin.Core.Models;
using CanDoo.Oil.Core.Models;

namespace CanDoo.Oil.Core.Models
{
    /// <summary>
    /// 实体类——店铺活动
    /// </summary>
    [Serializable]
    [Description("店铺活动")]
    public class StoreActivity :  EntityBase,ICreatedTime, IAudited,IRecyclable
    {
        public Customer Customer { get; set; }
        public long? CustomerId { get; set; }

        /// <summary>
        ///活动标题
        /// </summary>
        [Display(Name = "活动标题")]
        [Required, StringLength(50)]
        public override string Name { get; set; }

        /// <summary>
        ///活动简介
        /// </summary>
        [Display(Name = "活动简介")]
        [Required, StringLength(50)]
        public string Introduction { get; set; }

        /// <summary>
        ///开始时间
        /// </summary>
        [Display(Name = "开始时间")]
        [Required]
        public DateTime? StartTime { get; set; }

        /// <summary>
        ///结束时间
        /// </summary>
        [Display(Name = "结束时间")]
        [Required]
        public DateTime? EndTime { get; set; }

        /// <summary>
        ///活动资源地址
        /// </summary>
        [Display(Name = "活动资源地址")]
        [Required, StringLength(500)]
        public string Url { get; set; }

        
        #region Implementation of ICreatedTime

        /// <summary>
        /// 获取设置 信息创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime CreatedTime { get; set; }
        #endregion

        #region Implementation of ICreatedAudited

        /// <summary>
        /// 获取或设置 创建者编号
        /// </summary>
        [Display(Name = "创建人")]
        public string CreatorUserId { get; set; }

        #endregion

        #region Implementation of IUpdateAutited

        /// <summary>
        /// 获取或设置 最后更新时间
        /// </summary>
        [Display(Name = "最后更新时间")]
        public DateTime? LastUpdatedTime { get; set; }

        /// <summary>
        /// 获取或设置 最后更新者编号
        /// </summary>
        [Display(Name = "最后更新用户")]
        public string LastUpdatorUserId { get; set; }

        #endregion

        #region Implementation of IsDeleted 逻辑删除接口
        /// <summary>
        /// 逻辑删除接口
        /// </summary>
        [Display(Name = "是否删除")]
        public bool IsDeleted { get; set; }
        #endregion
    }
}
